package com.kitri.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.kitri.dao.*;
import com.kitri.domain.JuctionCoSu;

@Service
public class JuctionCoSuServiceImpl implements JuctionCoSuService {
	private JuctionCoSuDao juctionCoSuDao = null;

	public JuctionCoSuServiceImpl() {
		this.juctionCoSuDao = ((JuctionCoSuDaoImpl) AppContext.getAppContext()
				.getBean("juctionCoSuDao"));
	}

	@Override
	public void add(String courseId, String subjectId) {
		System.out.println(2);
		juctionCoSuDao.add(courseId, subjectId);
	}

	@Override
	public void remove(String courseId, String subjectId) {
		juctionCoSuDao.remove(courseId, subjectId);
	}

	@Override
	public void removeOfCourse(String courseId) {
		juctionCoSuDao.removeOfCourse(courseId);
	}

	@Override
	public boolean checkIt(String courseId, String subjectId) {
		return juctionCoSuDao.checkIt(courseId, subjectId);
	}

	@Override
	public List<JuctionCoSu> list() {
		return juctionCoSuDao.list();
	}
}
